package com.jr.controller;


import com.jr.entity.Enterprise;
import com.jr.service.EnterpriseService;
import com.jr.service.UserJobEnterpriseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;


/**
 * 企业表
 *
 * @author Snoopy
 * @since 1.0.0 2022-12-31
 */
@RestController
public class EnterpriseController {
    @Autowired
    private EnterpriseService enterpriseService;
    @Autowired
    private UserJobEnterpriseService userJobEnterpriseService;
    /**
     * 通过uid查询企业信息
     */
    @GetMapping(value = "company.do", produces ="text/html;charset=utf-8")
    public ModelAndView selctEnteerpriseByEid(String eid){
        ModelAndView modelAndView = new ModelAndView();
        Enterprise enterprise = enterpriseService.getEnterprise(eid);
        modelAndView.addObject("enterprise",enterprise);
        modelAndView.setViewName("company.jsp");
        return modelAndView;



    }

}